package action.article;

import service.ArticleService;
import bean.Article;
import bean.User;

import com.opensymphony.xwork2.ActionSupport;

public class ViewArticleAction extends ActionSupport {
	private User user;
	private Article article;
	private ArticleService articleService;
	
	@Override
	public String execute() throws Exception {
		
		article=articleService.getArticleById(article.getId());
		user=article.getArticleClass().getUser();
		return SUCCESS;
	}

	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	public ArticleService getArticleService() {
		return articleService;
	}

	public void setArticleService(ArticleService articleService) {
		this.articleService = articleService;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	
}
